package edu.sctu.xuping.month06.goodstest;

import java.io.IOException;

/**
 * Created by Administrator on 2015/6/29.
 */
public class ExecutionProcessUtil {



    public void operationData() throws IOException, ClassNotFoundException {

        ThreadUtil threadUtil = new ThreadUtil();
        threadUtil.run();//利用线程使数据5秒后再输出

        NetworkDataCapture interfaceUtil = new NetworkDataCapture();
        String json = interfaceUtil.httpGetInterface(new PathAppbean().URL_Path);//获取接口信息

        JsonDataUtil jsonDataUtil = new JsonDataUtil();
        GoodsAppbean goodsData = jsonDataUtil.jsonData(json);//解析数据

        FileUtil fileUtil = new FileUtil();
        fileUtil.createFolder("D://Json");
        fileUtil.saveJsonFile("D://Json//Json.txt", json);//将获取到的数据写入文件
        fileUtil.createAppbeanFile("D://Json//Appbean.txt");
        fileUtil.appbeanClassTransfor("D://Json//Appbean.txt",goodsData);//将获取到的数据转换为实体类

        new PriceDataUtil().priceDataUtil(goodsData);
    }
}


